﻿using System.Net;
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
var socket = Dong.Client.Connect("150.158.103.222", 5009);
var command = Console.ReadLine();
if (command == "0")
{
    Dong.Client.WaitForConnection(socket);
    Console.ReadLine();
}
else
{
    System.Console.WriteLine("Enter IP");
    var ip = Console.ReadLine();
    System.Console.WriteLine("Enter port");
    var port = int.Parse(Console.ReadLine()!);
    Dong.Client.ConnectTo(socket, ip!, port);
    Console.ReadLine();
}